package com.jz.netthings.application.bodyCheck.mapper.mysql;

import com.baomidou.mybatisplus.plugins.Page;
import com.jz.netthings.appengine.baseData.ProviderInfo;
import com.jz.netthings.application.bodyCheck.bean.BodyCheck;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.jz.netthings.application.bodyCheck.bean.BodyCheckInfo;
import com.jz.netthings.application.bodyCheck.bean.MyPage;
import org.apache.ibatis.annotations.Param;
import com.jz.netthings.application.bodyCheck.bean.BodyCheckStatus;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lzf
 * @since 2019-02-26
 */
public interface BodyCheckMapper extends BaseMapper<BodyCheck> {

    List<BodyCheck> queryByTime(
            @Param("currentPage") Integer currentPage,
            @Param("pageSize") Integer pageSize,
            @Param("recodeCreateTime") String recodeCreateTime,
            @Param("bigCreateTime")String bigCreateTime,
            @Param("lessCreateTime")String lessCreateTime,
            @Param("infoIds")List<Long> infoIds);

    Integer queryCount(
            @Param("recodeCreateTime") String recodeCreateTime,
            @Param("bigCreateTime")String bigCreateTime,
            @Param("lessCreateTime")String lessCreateTime,
            @Param("infoIds")List<Long> infoIds);

    List<BodyCheckStatus> queryBodyCheckStatus(String type);

     BodyCheckInfo queryBodyCheckInfo(String id);

    List<BodyCheck> queryByName(@Param("name") String name,
                                @Param("bigCreateTime")String bigCreateTime,
                                @Param("lessCreateTime")String lessCreateTime);

    List<BodyCheck> selectByBodyCheck( BodyCheck gCheck);

    void updateGJZBodyCheck(BodyCheck gBodyCheck);

    @Select("SELECT MIN(bodyEndTime) FROM body_check WHERE recodeCreateTime BETWEEN #{beginTime} AND #{endTime}")
    String getMinBodyCheckEndTime(@Param("beginTime")String beginTime,@Param("endTime")String endTime);

//    List<BodyCheckInfo> queryByBigCheck(String id);
}
